package com.bloom.util;

import org.springframework.mail.MailSender;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSenderImpl;

public class MailUtil {
	
	private static final MailSender mailSender = new JavaMailSenderImpl();
	
	public static void sendRegistrationMail(String email, String password) {
		
		SimpleMailMessage message = new SimpleMailMessage();
		message.setFrom("admin@bloomTravel.com");
		message.setSubject("Registration Successfull");
		message.setText("Your password is " + password + "\r\nUser id is same as your email id");
		message.setTo(email);
		
		mailSender.send(message);
		
	}

}
